<template>
    <!-- 歌单详情页-左边 -->
    <div class="detail_l">
        <div class="detail_t">
            <div class="header">
                <img :src="playlist.coverImgUrl" alt="" style="width:208px;">
                <i class="mask"></i>
                <i :class="{'vip':playlist.highQuality}"></i>
            </div>
            <div class="info">
                <div class="title">
                    <i class="sing"></i>
                    <h2>{{ playlist.name }}</h2>
                </div>
                <div class="user">
                    <img :src="creator.avatarUrl" alt="" style="height:35px" @click="$router.push(`/user/${creator.userId}`)">
                    <span class="name" @click="$router.push(`/user/${creator.userId}`)">{{ creator.nickname }}<img class="star" src="../../assets/images/public/star.png" v-show="playlist.highQuality"></span>
                    <span class="set">{{ createTime | showDate }} 创建</span>
                </div>
                <div class="btns">
                  <a class="play" title="播放" @click="play">
                    <i class="play_in">
                      <span>播放</span>
                    </i>
                  </a>
                  <a class="add" title="添加到播发列表"></a>
                  <a class="dis" title="收藏">
                    <span>({{ subCount || '收藏' }})</span>
                  </a>
                  <a class="share" title="分享">
                    <span>({{ shareCount || '分享' }})</span>
                  </a>
                  <a class="download">
                    <span>下载</span>
                  </a>
                  <a class="comment" title="评论" @click="viewClick()">
                    <span>({{ commentCount || '评论' }})</span>
                  </a>
                </div>
                <div class="tags">
                  <b>标签：</b>
                  <a href="javascript:;" v-for="item in playlist.tags" :key="item.id">{{ item }}</a>
                </div>
                <div class="dec">
                  <!-- 文字超过第10行显示... -->
                  <p v-html="'介绍：'+description" :class="{'clamp':!isShow}"></p>
                  <a v-show="!isShow" @click="isShow=!isShow">展开<i class="exp"></i></a>
                  <a v-show="isShow" @click="isShow=!isShow">收齐<i class="col"></i></a>
                </div>
            </div>
        </div>
        <!-- 歌单列表 -->
        <div class="detail_b">
            <div class="titles">
              <h3>歌曲列表</h3>
              <span class="sub">{{ playlist.trackCount }}首歌</span>
              <div class="more">
                播放：<span class="fc"> {{ playlist.playCount }} </span>次
              </div>
            </div>
            <div class="song">
              <div class="header">
                <li class="w1"></li>
                <li class="w2">歌曲标题</li>
                <li class="w3">时长</li>
                <li class="w4">歌手</li>
                <li class="w5">专辑</li>
              </div>
              <div class="mainer">
                <ul v-for="(item, index) in love" :key="index">
                  <li class="m1 ellipsis">
                    <span>{{ index + 1 }}</span>
                  </li>
                  <li class="m2">
                    <img :src="item.al.picUrl" v-show="index >= 0" />
                    <i class="play" @click="playmusic(index)" v-show="item.resourceState"></i>
                    <i class="active" v-show="!item.resourceState"></i>
                    <!-- 单个单击样式 -->
                    <!-- <i :class="{'active':index===currentIndex}"></i> -->
                    <span :title="item.name" class="handle ellipsis" @click="$router.push(`/songlist/${item.id}`)">{{
                      item.name
                    }}</span>
                    <i class="mv" v-show="item.mv" @click="$router.push(`/mvlist/${item.mv}`)"></i>
                  </li>
                  <li class="m3">
                    <span class="time">{{ min(item) }}:{{ sec(item) }}</span>
                    <div class="show">
                      <a title="添加到播放列表" class="a1"></a>
                      <a title="收藏" class="a2"></a>
                      <a title="分享" class="a3"></a>
                      <a title="下载" class="a4"></a>
                    </div>
                  </li>
                  <li class="m4 ellipsis">
                    <a class="artist" v-for="item1 in item.ar" :key="item1.id" @click="$router.push(`/artlist/${item1.id}`)" :title="item1.name">{{ item1.name }}<span>/</span></a>
                  </li>
                  <li class="m5 ellipsis">
                    <a :title="item.al.name" @click="$router.push(`/albumlist/${item.al.id}`)">{{ item.al.name }}</a>
                  </li>
                </ul>
              </div>
            </div>
            <MusicPlay :ids="ids" :imgUrl="imgUrl" :isPlay="isPlay" />
        </div>
        <!-- 歌单评论 -->
        <div class="comment_title" id="view">
            <h2>评论</h2>
            <span>共{{ commentCount }}条评论</span>
        </div>
        <div class="comment">
            <div class="com_l">
                <img src="http://p1.music.126.net/B8zVoyFfiBy6hnrLy3KTWg==/109951167913480051.jpg?param=200y200" alt="" v-if="$store.state.isHeader">
                <img src="http://s4.music.126.net/style/web2/img/default/default_avatar.jpg?param=50y50" alt="" v-else>
            </div>
            <div class="com_r">
                <textarea name="" id="" placeholder="评论" v-model="content"></textarea>
                <div class="btns">
                    <div><i class="smile"></i><i class="alt"></i></div>
                    <div><span class="count">{{contentMaxLength - content.length}}</span><a @click="viewBtn">评论</a></div>
                </div>
            </div>
        </div>
        <div class="comment_list">
            <h3 v-show="hotComments.length==0?false:true">精彩评论</h3>
            <ul>
                <li v-for="(item, index) in hotComments" :key="index">
                    <img :src="item.user.avatarUrl" alt="">
                    <div class="cnt">
                        <div class="cnt_t">
                            <p class="text">
                                <span class="name" @click="$router.push(`/user/${item.user.userId}`)">
                                    {{ item.user.nickname }}:
                                </span>
                                {{ item.content }}
                            </p>
                        </div>
                        <div class="cnt_c" v-for="item1 in item.beReplied" :key="item1.user.userId">
                            <p class="text" >
                                <span class="name" @click="$router.push(`/user/${item1.user.userId}`)">
                                    {{ item1.user.nickname }}:
                                </span>
                                {{ item1.content }}
                            </p>
                        </div>
                        <div class="cnt_b">
                            <span class="time">{{ item.time | showDate }}</span>
                            <span class="zan">
                                <i class="good" v-show="!item.liked" @click="likeFn(item)"></i>
                                <i class="like" v-show="item.liked" @click="unlikeFn(item)"></i>
                                <i class="count">({{ item.likedCount }})</i>
                                <i class="sep">|</i>
                                <i class="view" @click="replyFn(item)">回复</i>
                            </span>
                        </div>
                        <!-- 回复区域 -->
                        <div class="reply" v-show="item.owner">
                            <textarea v-model="recontent" ></textarea>
                            <div class="btns">
                              <div><i class="smile"></i><i class="alt"></i></div>
                              <div><span class="count">{{contentMaxLength - recontent.length}}</span><a @click="replyBtn(item)">回复</a></div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
            <h3 v-show="comments.length==0?false:true">最新评论</h3>
            <ul>
                <li v-for="(item, index) in comments" :key="index">
                    <img :src="item.user.avatarUrl" alt="">
                    <div class="cnt">
                        <div class="cnt_t">
                          <p class="text" >
                                <span class="name" @click="$router.push(`/user/${item.user.userId}`)">
                                    {{ item.user.nickname }}:
                                </span>
                                {{ item.content }}
                            </p>
                        </div>
                        <div class="cnt_c" v-for="item1 in item.beReplied" :key="item1.user.userId">
                            <p class="text" >
                                <span class="name" @click="$router.push(`/user/${item1.user.userId}`)">
                                    {{ item1.user.nickname }}:
                                </span>
                                {{ item1.content }}
                            </p>
                        </div>
                        <div class="cnt_b">
                            <span class="time">{{ item.timeStr }}</span>
                            <span class="zan">
                                <i class="good" v-show="!item.liked" @click="likeFn(item)"></i>
                                <i class="like" v-show="item.liked" @click="unlikeFn(item)"></i>
                                <i class="count">({{ item.likedCount }})</i>
                                <i class="sep">|</i>
                                <i class="view" @click="replyFn(item)">回复</i>
                            </span>
                        </div>
                        <!-- 回复区域 -->
                        <div class="reply" v-show="item.owner">
                            <textarea placeholder="回复" v-model="recontent"></textarea>
                            <div class="btns">
                              <div><i class="smile"></i><i class="alt"></i></div>
                              <div><span class="count">{{contentMaxLength - recontent.length}}</span><a @click="replyBtn(item)">回复</a></div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</template>

<script>
import { reqPlayList, reqAllList, MusicCommentApi, DetailViewApi, DetailLikeApi } from "@/request/api";
import { formatDate } from '@/assets/utils/date';
import MusicPlay from "@/components/MusicPlay.vue";
export default {
    data () {
        return {
            playlist: "",
            creator: "",
            createTime: 0,
            subCount: 0,
            shareCount: 0,
            commentCount: 0,
            description: "",
            isShow: false,
            love: [],
            ids: 0,
            imgUrl: "https://img2.baidu.com/it/u=1611088966,2458167776&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
            isPlay: false,
            hotComments: [],
            comments: [],
            content: "",
            recontent: "",
            contentMaxLength: 140,
            // currentIndex: 0,
        }
    },
    components: {
        MusicPlay,
    },
    filters: {
      showDate: function(value) {
        let date = new Date(value);
        // return formatDate(date, 'yyyy-MM-dd hh:mm:ss');
        return formatDate(date, 'yyyy-MM-dd');
      }
    },
    computed: {
        id() {
          return this.$route.params.id;
        },
    },
    created() {
        // 根据id获取 歌曲数量 和 歌曲播发次数
        reqPlayList(this.id).then((res) => {
          console.log(res);
          this.playlist = res.data.playlist;
          this.creator = res.data.playlist.creator;
          this.createTime = res.data.playlist.createTime;
          this.subCount = res.data.playlist.subscribedCount;
          this.shareCount = res.data.playlist.shareCount;
          this.commentCount = res.data.playlist.commentCount;
          this.description = res.data.playlist.description;
        });
        // 获取歌曲列表
        reqAllList(this.id).then((res) => {
          // console.log(res);
          this.love = res.data.songs;
        });
        // 获取歌单评论
        MusicCommentApi(this.id).then((res) => {
          // console.log(res);
          this.commentCount = res.data.total;
          this.hotComments = res.data.hotComments;
          this.comments = res.data.comments;
        });
    },
    methods: {
        viewClick() {
          document.querySelector('#view').scrollIntoView({
            behavior: "auto",
            block: "center",
            inline: "nearest"
          })
        },
        min(song) {
          if (parseInt(song.dt / 60000) < 10)
          return "0" + parseInt(song.dt / 60000);
          else return parseInt(song.dt / 60000);
        },
        sec(song) {
          let x = parseInt(song.dt / 60000);
          let y = parseInt(song.dt / 1000 - x * 60);
          if (y < 10) return "0" + y;
          else return y;
        },
        play() {
          this.love.forEach(item=>item.resourceState=true);
          this.love[0].resourceState = false;
          this.ids = this.love[0].id;
          this.imgUrl = this.love[0].al.picUrl;
          this.isPlay = true;
        },
        playmusic(index) {
          this.love.forEach(item=>item.resourceState=true);
          this.love[index].resourceState = false;
          // this.currentIndex = index;
          this.ids = this.love[index].id;
          this.imgUrl = this.love[index].al.picUrl;
          this.isPlay = true;
        },
        // 评论
        viewBtn() {
          if(this.content.length === 0){
            let obj = { content: "请输入点内容再提交!", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }else if(this.content.length <= this.contentMaxLength) {
            DetailViewApi({
              t: 1,
              type: 2,
              id: this.id,
              content: this.content,
            }).then((res) => {
              // console.log(res);
              if(res.data.code === 302){
                // 检验评论成功
                let obj = { content: "评论成功!", icon: "success" };
                this.$store.dispatch("AsyncToast", obj);
              }else{
                // 检验发送失败
                let obj = { content: "评论失败!", icon: "danger" };
                this.$store.dispatch("AsyncToast", obj);
              }
            })
            this.content = "";
            this.commentCount = this.commentCount + 1;
          }else{
            let obj = { content: "输入不能超过140字符!", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }
        },
        // 点赞
        likeFn(item) {
          if(item.liked === false){
            DetailLikeApi({
              t: 1,
              type: 2,
              id: this.id,
              cid: item.commentId,
            }).then((res) => {
              // console.log(res);
              if(res.data.code === 302){
                let obj = { content: "点赞成功!", icon: "success" };
                this.$store.dispatch("AsyncToast", obj);
              }else{
                let obj = { content: "点赞失败！", icon: "danger" };
                this.$store.dispatch("AsyncToast", obj);
              }
            })
            item.liked = true;
            item.likedCount = item.likedCount + 1;
          }else{
            let obj = { content: "已点赞！", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }
        },
        // 取消点赞
        unlikeFn(item) {
          if(item.liked === true){
            DetailLikeApi({
              t: 0,
              type: 2,
              id: this.id,
              cid: item.commentId,
            }).then((res) => {
              // console.log(res);
              if(res.data.code === 302){
                let obj = { content: "取消点赞成功!", icon: "success" };
                this.$store.dispatch("AsyncToast", obj);
              }else{
                let obj = { content: "取消点赞失败！", icon: "danger" };
                this.$store.dispatch("AsyncToast", obj);
              }
            })
            item.liked = false;
            item.likedCount = item.likedCount - 1;
          }else{
            let obj = { content: "已取消点赞！", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }
        },
        // 回复
        replyFn(item) {
          if(item.owner === false){
            this.hotComments.forEach(item=>item.owner=false);
            this.comments.forEach(item=>item.owner=false);
            item.owner = true;
            this.recontent = '回复'+item.user.nickname+':';
          }else{
            item.owner = false;
          }
        },
        // 回复评论
        replyBtn(item) {
          // console.log(item.user.nickname.length+3);
          if(this.recontent.length === item.user.nickname.length+3){
            let obj = { content: "请输入点内容再提交!", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }else if(this.recontent.length <= this.contentMaxLength){
            DetailViewApi({
              t: 2,
              type: 2,
              id: this.id,
              content: this.recontent,
              commentId: item.commentId,
            }).then((res) => {
              // console.log(res);
              if(res.data.code === 302){
                // 检验回复成功
                let obj = { content: "回复成功!", icon: "success" };
                this.$store.dispatch("AsyncToast", obj);
              }else{
                // 检验回复失败
                let obj = { content: "回复失败!", icon: "danger" };
                this.$store.dispatch("AsyncToast", obj);
              }
            })
            item.owner = false;
          }else{
            let obj = { content: "输入不能超过140字符!", icon: "danger" };
            this.$store.dispatch("AsyncToast", obj);
          }
        },
    },
}
</script>
 
<style lang = "less" scoped>
@import "../../assets/base";
.detail_l {
    width: 640px;
    background-color: #fff;
    border-left: 1px solid #D7D7D7;
    padding: 40px;
    .detail_t {
        width: 640px;
        min-height: 208px;
        display: flex;
        margin-bottom: 20px;
        .header {
            position: relative;
            width: 208px;
            text-align: center;
            .mask {
                position: absolute;
                top: 0;
                left: 0;
                width: 208px;
                height: 208px;
                display: block;
                background: url("../../assets/images/public/coverall.png") no-repeat 0 -1285px;
            }
            .vip {
                position: absolute;
                top: 4px;
                left: 4px;
                width: 50px;
                height: 50px;
                display: block;
                background: url("@/assets/images/public/icon2.png") no-repeat -80px -220px;
            }
        }
        .info {
            width: 410px;
            margin-left: 20px;
            .title {
                width: 410px;
                display: flex;
                h2 {
                    width: 86%;
                    line-height: 24px;
                    font-size: 20px;
                    color: #333;
                }
                .sing {
                    width: 54px;
                    height: 24px;
                    margin-right: 6px;
                    background: url("../../assets/images/public/icon.png") no-repeat 0 -244px;
                }
            }
            .user {
                margin-top: 10px;
                width: 100%;
                height: 35px;
                line-height: 35px;
                margin-bottom: 20px;
                font-size: 12px;
                display: flex;
                align-items: center;
                img {
                  cursor: pointer;
                }
                i {
                    display: inline-block;
                    width: 13px;
                    height: 13px;
                    position: relative;
                    top: 2px;
                    margin-left: 3px;
                    background: url("../../assets/images/public/icon.png") no-repeat -18px -682px;
                }
                .name {
                    color: #0c73c2;
                    margin: 0 10px;
                    &:hover {
                      cursor: pointer;
                      text-decoration: underline;
                    }
                    .star {
                        width: 13px;
                        height: 13px;
                    }
                }
                .set {
                    color: #999;
                }
            }
            .btns {
                height: 31px;
                display: flex;
                margin-bottom: 20px;
                .play {
                    span {
                      font-size: 12px;
                      color: #fff;
                      line-height: 31px;
                      padding: 0 0 0 35px;
                    }
                    .play_in {
                      width: 65px;
                      height: 31px;
                      display: block;
                      background: url("../../assets/images/public/button2.png") no-repeat;
                      background-position: 0 -633px;
                      &:hover {
                        cursor: pointer;
                        background-position: 0 -719px;
                      }
                    }
                }
                .add {
                    width: 31px;
                    height: 31px;
                    margin-right: 5px;
                    background: url("../../assets/images/public/button2.png") no-repeat 0 -1588px;
                
                    &:hover {
                        cursor: pointer;
                        background-position: -40px -1588px;
                    }
                    &:active {
                        background-position: -80px -1588px;
                    }
                }
                .dis {
                    margin-right: 6px;
                    height: 100%;
                    background: url("../../assets/images/public/button2.png") no-repeat;
                    background-position: 0px -977px;
                    span {
                        display: inline-block;
                        height: 100%;
                        background: url("../../assets/images/public/button2.png") no-repeat right -1106px;
                        line-height: 30px;
                        padding-left: 30px;
                        padding-right: 4px;
                        font-size: 12px;
                        // color: #ccc;
                    }   
                    &:hover {
                        color: #666;
                        cursor: pointer;
                    }
                }
                .share {
                    height: 31px;
                    margin-right: 6px;
                    float: left;
                    min-width: 23px;
                    cursor: pointer;
                    background: url("../../assets/images/public/button2.png") no-repeat;
                    background-position: 0 -1225px;
                    span {
                        height: 100%;
                        display: inline-block;
                        line-height: 30px;
                        padding-left: 28px;
                        padding-right: 4px;
                        background: url("../../assets/images/public/button2.png") no-repeat;
                        background-position: right -1020px;
                        font-size: 12px;
                    }
                    &:hover {
                        color: #666;
                        cursor: pointer;
                    }
                }
                .download {
                    margin-right: 5px;
                    height: 31px;
                    min-width: 23px;
                    cursor: pointer;
                    background: url("../../assets/images/public/button2.png") no-repeat;
                    background-position: 0 -2761px;
                    span {
                        height: 100%;
                        width: 31px;
                        display: inline-block;
                        line-height: 30px;
                        padding-left: 28px;
                        padding-right: 8px;
                        background: url("../../assets/images/public/button2.png") no-repeat;
                        background-position: right -1020px;
                        font-size: 12px;
                    }
                    &:hover {
                        color: #666;
                        cursor: pointer;
                    }
                }
                .comment {
                    margin-right: 5px;
                    height: 31px;
                    min-width: 23px;
                    cursor: pointer;
                    background: url("../../assets/images/public/button2.png") no-repeat;
                    background-position: 0 -1465px;
                    span {
                        height: 100%;
                        display: inline-block;
                        line-height: 30px;
                        padding-left: 28px;
                        padding-right: 8px;
                        background: url("../../assets/images/public/button2.png") no-repeat;
                        background-position: right -1020px;
                        font-size: 12px;
                        color: #333;
                    }
                    &:hover {
                        color: #666;
                        cursor: pointer;
                    }
                }
            }
            .tags {
                line-height: 22px;
                font-size: 12px;
                color: #666;
                a {
                    line-height: 22px;
                    text-align: center;
                    color: #777;
                    border: 1px solid #777;
                    background: #f5f5f5;
                    padding: 0 10px;
                    margin: 0 10px;
                    border-radius: 20px;
                }
            }
            .dec {
                width: 410px;
                p {
                    white-space: pre-wrap;
                    font-size: 12px;
                    color: #666;
                    // text-indent: 2em;
                    margin-top: 4px;
                    line-height: 18px;
                    color: #666;
                }
                .clamp {
                    overflow:hidden; 
                    text-overflow:ellipsis; 
                    display:-webkit-box; 
                    -webkit-box-orient:vertical; 
                    -webkit-line-clamp: 3;
                }
                a {
                    display: flex;
                    justify-content: flex-end;
                    align-items: center;
                    font-size: 12px;
                    color: #0C73C2;
                    &:hover {
                        cursor: pointer;
                        text-decoration: underline;
                    }
                    .exp {
                        width: 12px;
                        height: 8px;
                        display: inline-block;
                        background: url("@/assets/images/public/icon.png")    no-repeat -65px -520px;
                    }
                    .col {
                        width: 12px;
                        height: 8px;
                        display: inline-block;
                        background: url("@/assets/images/public/icon.png")    no-repeat -45px -520px;
                    }
                }
            }
        }
    }
    .detail_b {
        width: 640px;
        float: left;
        margin-bottom: 20px;
        .titles {
          width: 640px;
          height: 35px;
          border-bottom: 2px solid @red;
          h3 {
            font-family: "Microsoft Yahei", Arial, Helvetica, sans-serif;
            font-size: 20px;
            line-height: 28px;
            font-weight: normal;
            color: #333;
            float: left;
          }
          .sub {
            margin: 9px 0 0 20px;
            float: left;
            color: #666;
            font-size: 12px;
            font-family: Arial, Helvetica, sans-serif;
            -webkit-text-size-adjust: none;
          }
          .more {
            margin-top: 5px;
            height: 16px;
            float: right;
            font-size: 12px;
            margin-right: 8px;
            .fc {
              color: @red;
              font-weight: bold;
            }
          }
        }
        .song {
          width: 640px;
          border: 1px solid #d9d9d9;
          .header {
            width: 640px;
            height: 39px;
            display: flex;
            font-size: 12px;
            color: #666;
      
            li {
              border-right: 1px solid #d9d9d9;
              background-image: linear-gradient(
                rgb(255, 255, 255),
                rgb(240, 240, 240)
              );
              padding: 8px 10px;
              box-shadow: 0 1px 1px 1px rgba(0, 0, 0, 0.1);
              line-height: 26px;
            }
            .w1 {
              width: 61px;
            }
            .w2 {
              width: 275px;
            }
            .w3 {
              width: 91px;
            }
            .w4 {
              width: 82px;
            }
            .w5 {
              width: 125px;
            }
          }
          .mainer {
            width: 100%;
            display: block;
            font-size: 12px;
            a {
              color: #000;
              text-decoration: none;
            }
            ul:nth-of-type(even) {
              background: #e5e5e5;
            }
            ul:nth-of-type(odd) {
              background: #f6f6f6;
            }
            .good {
              height: 66px;
              span,
              a,
              i {
                display: block;
                margin-top: 20px !important;
                font-size: 12px;
              }
            }
            ul {
              height: 30px;
              width: 100%;
              display: flex;
      
              &:hover .time {
                display: none !important;
              }
              &:hover .show {
                display: block !important;
              }
      
              li {
                padding: 6px 10px;
              }
              .m1 {
                width: 30px;
                // height: 100%;
                padding: 6px 10px;
                line-height: 18px;
                span {
                  float: left;
                  width: 25px;
                  height: 18px;
                  color: #999;
                  text-align: center;
                }
                i {
                  margin: 0 8px;
                  float: left;
                  width: 16px;
                  height: 17px;
                  background: url("../../assets/images/public/icon.png") no-repeat -67px -283px;
                }
              }
              .m2 {
                width: 326px;
                display: flex;
                align-items: center;
                .handle{
                  width: 180px;
                  cursor: pointer;
                }
                img {
                  float: left;
                  margin-right: 10px;
                  height: 20px;
                  margin-top: 3px;
                }
                .play {
                  float: left;
                  display: block;
                  width: 17px;
                  height: 17px;
                  margin-right: 8px;
                  background: url("../../assets/images/public/table.png") no-repeat -0px -103px;
                  margin-top: 1px;
                  &:hover {
                    background-position: -0px -128px;
                    cursor: pointer;
                  }
                }
                .active {
                  float: left;
                  display: block;
                  width: 17px;
                  height: 17px;
                  margin-right: 8px;
                  background: url("../../assets/images/public/table.png") no-repeat -20px -128px;
                }
                .mv {
                  float: left;
                  display: block;
                  width: 23px;
                  height: 17px;
                  background: url("../../assets/images/public/table.png") no-repeat;
                  background-position: 0 -151px;
                  &:hover {
                    background-position: -30px -151px;
                    cursor: pointer;
                  }
                }
                a {
                  width: 260px;
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                  float: left;
                  margin-left: 10px;
                  &:hover {
                    color: #666;
                    cursor: pointer;
                    text-decoration: underline;
                  }
                }
              }
              .m3 {
                width: 91px;
                .time {
                  display: block;
                }
                .show {
                  width: 79px;
                  height: 18px;
                  display: none;
                  a {
                    margin: 2px 0 0 4px;
                    width: 18px;
                    height: 16px;
                    display: block;
                    float: left;
                    background: url("../../assets/images/public/table.png") no-repeat;
                    &:hover {
                      cursor: pointer;
                    }
                  }
                  .a1 {
                    width: 13px;
                    height: 13px;
                    margin-top: 2px;
                    margin-left: 0;
                    background: url("../../assets/images/public/icon.png") no-repeat;
                    background-position: 0 -700px;
      
                    &:hover {
                      background-position: -22px -700px;
                    }
                  }
                  .a2 {
                    background-position: 0 -174px;
                    &:hover {
                      background-position: -20px -174px;
                    }
                  }
                  .a3 {
                    background-position: 0 -195px;
                    &:hover {
                      background-position: -20px -195px;
                    }
                  }
                  .a4 {
                    background-position: -81px -174px;
                    &:hover {
                      background-position: -104px -174px;
                    }
                  }
                }
              }
              .m4 {
                width: 82px;
                color: #333;
                & a:hover {
                  color: #666;
                  cursor: pointer;
                  text-decoration: underline;
                }
                .artist {
                  &:last-child {
                    span {
                      display: none;
                    }
                  }
                }
              }
              .m5 {
                width: 132px;
                color: #333;
                & a:hover {
                  color: #666;
                  cursor: pointer;
                  text-decoration: underline;
                }
              }
            }
          }
        }
    }
    .comment_title {
        height: 40px;
        width: 640px;
        border-bottom: 2px solid @red;
        display: flex;
        align-items: center;
        margin-bottom: 20px;
        h2 {
            font-size: 20px;
            color: #333;
            cursor: pointer;
            &:hover {
                text-decoration: underline;
            }
        }
        span {
            font-size: 12px;
            color: #666;
            margin: 9px 0 0 20px;
        }
    }
    .comment {
        display: flex;
        font-size: 12px;
        .com_l {
            height: 100px;
            margin-right: 10px;
            img {
                width: 50px;
                height: 50px;
            }
        }
        .com_r {
            height: 100px;
            textarea {
                resize:none;
                width: 565px;
                height: 50px;
                padding: 5px 6px 6px;
                border: 1px solid #cdcdcd;
                border-radius: 2px;
                line-height: 19px;
                box-sizing: content-box;
            }
            .btns {
                padding: 10px 0 0;
                display: flex;
                justify-content: space-between;
                .smile {
                    cursor: pointer;
                    width: 18px;
                    height: 18px;
                    display: inline-block;
                    background: url("@/assets/images/public/icon.png") no-repeat;
                    background-position: -40px -490px;
                    margin-right: 10px;
                }
                .alt {
                    cursor: pointer;
                    width: 18px;
                    height: 18px;
                    display: inline-block;
                    background: url("@/assets/images/public/icon.png") no-repeat;
                    background-position: -60px -490px;
                }
                .count {
                    font-size: 12px;
                    color: #999;
                    margin-right: 10px;
                }
                a {
                    width: 46px;
                    height: 25px;
                    display: inline-block;
                    background: url("@/assets/images/public/button.png") no-repeat;
                    background-position: -84px -64px;
                    color: #fff;
                    text-align: center;
                    line-height: 25px;
                    &:hover {
                        cursor: pointer;
                        background-position: -84px -94px;
                    }
                }
            }
        }
    }
    .comment_list {
        h3 {
            height: 20px;
            width: 640px;
            font-weight: bolder;
            font-size: 12px;
            color: #333;
            border-bottom: 1px solid #ccc;
            display: flex;
            align-items: center;
            margin-top: 20px;
        }
        ul {
            li {
                width: 640px;
                padding: 15px 0;
                display: flex;
                border-bottom: 1px dotted #999;
                &:last-child {
                    border: 0;
                }
                img {
                    cursor: pointer;
                    width: 50px;
                    height: 50px;
                }
                .cnt {
                    font-size: 12px;
                    margin-left: 10px;
                }
                .cnt_t {
                    width: 580px;
                    display: flex;
                    align-items: center;
                    .name {
                        line-height: 20px;
                        color: #0C73C2;
                        &:hover {
                            cursor: pointer;
                            text-decoration: underline;
                            color: #0C73C2;
                        }
                    }
                    .text {
                        line-height: 20px;
                        color: #333;
                    }
                }
                .cnt_c {
                    width: 540px;
                    padding: 8px 20px;
                    margin-top: 10px;
                    line-height: 20px;
                    background: #f4f4f4;
                    border: 1px solid #dedede;
                    display: flex;
                    align-items: center;
                    .name {
                        line-height: 20px;
                        color: #0C73C2;
                        &:hover {
                            cursor: pointer;
                            text-decoration: underline;
                            color: #0C73C2;
                        }
                    }
                    .text {
                        line-height: 20px;
                        color: #333;
                    }
                }
                .cnt_b {
                    width: 580px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin: 15px 0;
                    .time {
                        color: #999;
                    }
                    .zan {
                        .good {
                            width: 15px;
                            height: 14px;
                            display: inline-block;
                            background: url("@/assets/images/public/icon2.png") no-repeat;
                            background-position: -150px 0;
                            &:hover {
                                cursor: pointer;
                                background-position: -150px -20px;
                            }
                        }
                        .like {
                            width: 15px;
                            height: 14px;
                            display: inline-block;
                            background: url("@/assets/images/public/icon2.png") no-repeat;
                            background-position: -170px 0;
                        }
                        .count {
                            margin-left: 8px;
                            color: #333;
                            &:hover {
                                cursor: pointer;
                                text-decoration: underline;
                                color: #333;
                            }
                        }
                        .sep {
                            margin: 0 8px;
                            color: #ccc;
                        }
                        .view {
                            color: #666;
                            &:hover {
                                cursor: pointer;
                                text-decoration: underline;
                                color: #666;
                            }
                        }
                    }
                }
                .reply {
                  width: 550px;
                  padding: 15px;
                  background: #f8f8f8;
                  border: 1px solid #dedede;
                  border-radius: 2px;
                  box-sizing: content-box;
                  textarea {
                    resize:none;
                    width: 540px;
                    height: 20px;
                    padding: 5px 6px 6px;
                    border: 1px solid #cdcdcd;
                    border-radius: 2px;
                    line-height: 20px;
                    text-align: start;
                  }
                  .btns {
                      padding: 10px 0 0;
                      display: flex;
                      justify-content: space-between;
                      .smile {
                          cursor: pointer;
                          width: 18px;
                          height: 18px;
                          display: inline-block;
                          background: url("@/assets/images/public/icon.png") no-repeat;
                          background-position: -40px -490px;
                          margin-right: 10px;
                      }
                      .alt {
                          cursor: pointer;
                          width: 18px;
                          height: 18px;
                          display: inline-block;
                          background: url("@/assets/images/public/icon.png") no-repeat;
                          background-position: -60px -490px;
                      }
                      .count {
                          font-size: 12px;
                          color: #999;
                          margin-right: 10px;
                      }
                      a {
                          width: 46px;
                          height: 25px;
                          display: inline-block;
                          background: url("@/assets/images/public/button.png") no-repeat;
                          background-position: -84px -64px;
                          color: #fff;
                          text-align: center;
                          line-height: 25px;
                          &:hover {
                              cursor: pointer;
                              background-position: -84px -94px;
                          }
                      }
                  }
                }
            }
        }
    }
}
</style>